3.11.65 \(\int \frac {\sqrt {c+\frac {d}{x}}}{\sqrt {a+\frac {b}{x}} x} \, dx\) [1065]

Optimal. Leaf size=93 \[ \frac {2 \sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c} \sqrt {a+\frac {b}{x}}}{\sqrt {a} \sqrt {c+\frac {d}{x}}}\right )}{\sqrt {a}}-\frac {2 \sqrt {d} \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {a+\frac {b}{x}}}{\sqrt {b} \sqrt {c+\frac {d}{x}}}\right )}{\sqrt {b}} \]

[Out]

2*arctanh(c^(1/2)*(a+b/x)^(1/2)/a^(1/2)/(c+d/x)^(1/2))*c^(1/2)/a^(1/2)-2*arctanh(d^(1/2)*(a+b/x)^(1/2)/b^(1/2)
/(c+d/x)^(1/2))*d^(1/2)/b^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 93, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {457, 132, 65, 223, 212, 12, 95, 214} \begin {gather*} \frac {2 \sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c} \sqrt {a+\frac {b}{x}}}{\sqrt {a} \sqrt {c+\frac {d}{x}}}\right )}{\sqrt {a}}-\frac {2 \sqrt {d} \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {a+\frac {b}{x}}}{\sqrt {b} \sqrt {c+\frac {d}{x}}}\right )}{\sqrt {b}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[c + d/x]/(Sqrt[a + b/x]*x),x]

[Out]

(2*Sqrt[c]*ArcTanh[(Sqrt[c]*Sqrt[a + b/x])/(Sqrt[a]*Sqrt[c + d/x])])/Sqrt[a] - (2*Sqrt[d]*ArcTanh[(Sqrt[d]*Sqr
t[a + b/x])/(Sqrt[b]*Sqrt[c + d/x])])/Sqrt[b]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 95

Int[(((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_))/((e_.) + (f_.)*(x_)), x_Symbol] :> With[{q = Denomin
ator[m]}, Dist[q, Subst[Int[x^(q*(m + 1) - 1)/(b*e - a*f - (d*e - c*f)*x^q), x], x, (a + b*x)^(1/q)/(c + d*x)^
(1/q)], x]] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[m + n + 1, 0] && RationalQ[n] && LtQ[-1, m, 0] && SimplerQ[
a + b*x, c + d*x]

Rule 132

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_), x_Symbol] :> Dist[b*d^(m
+ n)*f^p, Int[(a + b*x)^(m - 1)/(c + d*x)^m, x], x] + Int[(a + b*x)^(m - 1)*((e + f*x)^p/(c + d*x)^m)*ExpandTo
Sum[(a + b*x)*(c + d*x)^(-p - 1) - (b*d^(-p - 1)*f^p)/(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x
] && EqQ[m + n + p + 1, 0] && ILtQ[p, 0] && (GtQ[m, 0] || SumSimplerQ[m, -1] ||  !(GtQ[n, 0] || SumSimplerQ[n,
 -1]))

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 457

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rubi steps

\begin {align*} \int \frac {\sqrt {c+\frac {d}{x}}}{\sqrt {a+\frac {b}{x}} x} \, dx &=-\text {Subst}\left (\int \frac {\sqrt {c+d x}}{x \sqrt {a+b x}} \, dx,x,\frac {1}{x}\right )\\ &=-\left (c \text {Subst}\left (\int \frac {1}{x \sqrt {a+b x} \sqrt {c+d x}} \, dx,x,\frac {1}{x}\right )\right )-d \text {Subst}\left (\int \frac {1}{\sqrt {a+b x} \sqrt {c+d x}} \, dx,x,\frac {1}{x}\right )\\ &=-\left ((2 c) \text {Subst}\left (\int \frac {1}{-a+c x^2} \, dx,x,\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {c+\frac {d}{x}}}\right )\right )-\frac {(2 d) \text {Subst}\left (\int \frac {1}{\sqrt {c-\frac {a d}{b}+\frac {d x^2}{b}}} \, dx,x,\sqrt {a+\frac {b}{x}}\right )}{b}\\ &=\frac {2 \sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c} \sqrt {a+\frac {b}{x}}}{\sqrt {a} \sqrt {c+\frac {d}{x}}}\right )}{\sqrt {a}}-\frac {(2 d) \text {Subst}\left (\int \frac {1}{1-\frac {d x^2}{b}} \, dx,x,\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {c+\frac {d}{x}}}\right )}{b}\\ &=\frac {2 \sqrt {c} \tanh ^{-1}\left (\frac {\sqrt {c} \sqrt {a+\frac {b}{x}}}{\sqrt {a} \sqrt {c+\frac {d}{x}}}\right )}{\sqrt {a}}-\frac {2 \sqrt {d} \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {a+\frac {b}{x}}}{\sqrt {b} \sqrt {c+\frac {d}{x}}}\right )}{\sqrt {b}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(348\) vs. \(2(93)=186\).
time = 1.54, size = 348, normalized size = 3.74 \begin {gather*} \frac {2 \sqrt {c} \sqrt {c+\frac {d}{x}} \sqrt {b+a x} \left (\sqrt {b+a x}-\sqrt {\frac {a}{c}} \sqrt {d+c x}\right ) \left (b c-2 \sqrt {\frac {a}{c}} c \sqrt {b+a x} \sqrt {d+c x}+a (d+2 c x)\right ) \left (\sqrt {a} \sqrt {d} \tanh ^{-1}\left (\frac {\sqrt {c} \left (-a x+\sqrt {\frac {a}{c}} \sqrt {b+a x} \sqrt {d+c x}\right )}{\sqrt {a} \sqrt {b} \sqrt {d}}\right )+\sqrt {b} \sqrt {c} \log \left (\sqrt {b+a x}-\sqrt {\frac {a}{c}} \sqrt {d+c x}\right )\right )}{\sqrt {b} \sqrt {a+\frac {b}{x}} \sqrt {d+c x} \left (b c \left (-\sqrt {\frac {a}{c}} c \sqrt {b+a x}+3 a \sqrt {d+c x}\right )+a \left (-3 \sqrt {\frac {a}{c}} c d \sqrt {b+a x}-4 \sqrt {\frac {a}{c}} c^2 x \sqrt {b+a x}+a d \sqrt {d+c x}+4 a c x \sqrt {d+c x}\right )\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[c + d/x]/(Sqrt[a + b/x]*x),x]

[Out]

(2*Sqrt[c]*Sqrt[c + d/x]*Sqrt[b + a*x]*(Sqrt[b + a*x] - Sqrt[a/c]*Sqrt[d + c*x])*(b*c - 2*Sqrt[a/c]*c*Sqrt[b +
 a*x]*Sqrt[d + c*x] + a*(d + 2*c*x))*(Sqrt[a]*Sqrt[d]*ArcTanh[(Sqrt[c]*(-(a*x) + Sqrt[a/c]*Sqrt[b + a*x]*Sqrt[
d + c*x]))/(Sqrt[a]*Sqrt[b]*Sqrt[d])] + Sqrt[b]*Sqrt[c]*Log[Sqrt[b + a*x] - Sqrt[a/c]*Sqrt[d + c*x]]))/(Sqrt[b
]*Sqrt[a + b/x]*Sqrt[d + c*x]*(b*c*(-(Sqrt[a/c]*c*Sqrt[b + a*x]) + 3*a*Sqrt[d + c*x]) + a*(-3*Sqrt[a/c]*c*d*Sq
rt[b + a*x] - 4*Sqrt[a/c]*c^2*x*Sqrt[b + a*x] + a*d*Sqrt[d + c*x] + 4*a*c*x*Sqrt[d + c*x])))

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(142\) vs. \(2(69)=138\).
time = 0.08, size = 143, normalized size = 1.54

method result size
default \(-\frac {\sqrt {\frac {a x +b}{x}}\, x \sqrt {\frac {c x +d}{x}}\, \left (\ln \left (\frac {a d x +b c x +2 \sqrt {b d}\, \sqrt {\left (c x +d \right ) \left (a x +b \right )}+2 b d}{x}\right ) \sqrt {a c}\, d -\ln \left (\frac {2 a c x +2 \sqrt {\left (c x +d \right ) \left (a x +b \right )}\, \sqrt {a c}+a d +b c}{2 \sqrt {a c}}\right ) \sqrt {b d}\, c \right )}{\sqrt {b d}\, \sqrt {a c}\, \sqrt {\left (c x +d \right ) \left (a x +b \right )}}\) \(143\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c+d/x)^(1/2)/x/(a+1/x*b)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-((a*x+b)/x)^(1/2)*x*((c*x+d)/x)^(1/2)*(ln((a*d*x+b*c*x+2*(b*d)^(1/2)*((c*x+d)*(a*x+b))^(1/2)+2*b*d)/x)*(a*c)^
(1/2)*d-ln(1/2*(2*a*c*x+2*((c*x+d)*(a*x+b))^(1/2)*(a*c)^(1/2)+a*d+b*c)/(a*c)^(1/2))*(b*d)^(1/2)*c)/(b*d)^(1/2)
/(a*c)^(1/2)/((c*x+d)*(a*x+b))^(1/2)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d/x)^(1/2)/x/(a+b/x)^(1/2),x, algorithm="maxima")

[Out]

integrate(sqrt(c + d/x)/(sqrt(a + b/x)*x), x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 146 vs. \(2 (69) = 138\).
time = 1.32, size = 757, normalized size = 8.14 \begin {gather*} \left [\frac {1}{2} \, \sqrt {\frac {c}{a}} \log \left (-8 \, a^{2} c^{2} x^{2} - b^{2} c^{2} - 6 \, a b c d - a^{2} d^{2} - 4 \, {\left (2 \, a^{2} c x^{2} + {\left (a b c + a^{2} d\right )} x\right )} \sqrt {\frac {c}{a}} \sqrt {\frac {a x + b}{x}} \sqrt {\frac {c x + d}{x}} - 8 \, {\left (a b c^{2} + a^{2} c d\right )} x\right ) + \frac {1}{2} \, \sqrt {\frac {d}{b}} \log \left (-\frac {8 \, b^{2} d^{2} + {\left (b^{2} c^{2} + 6 \, a b c d + a^{2} d^{2}\right )} x^{2} - 4 \, {\left (2 \, b^{2} d x + {\left (b^{2} c + a b d\right )} x^{2}\right )} \sqrt {\frac {d}{b}} \sqrt {\frac {a x + b}{x}} \sqrt {\frac {c x + d}{x}} + 8 \, {\left (b^{2} c d + a b d^{2}\right )} x}{x^{2}}\right ), -\sqrt {-\frac {c}{a}} \arctan \left (\frac {2 \, a x \sqrt {-\frac {c}{a}} \sqrt {\frac {a x + b}{x}} \sqrt {\frac {c x + d}{x}}}{2 \, a c x + b c + a d}\right ) + \frac {1}{2} \, \sqrt {\frac {d}{b}} \log \left (-\frac {8 \, b^{2} d^{2} + {\left (b^{2} c^{2} + 6 \, a b c d + a^{2} d^{2}\right )} x^{2} - 4 \, {\left (2 \, b^{2} d x + {\left (b^{2} c + a b d\right )} x^{2}\right )} \sqrt {\frac {d}{b}} \sqrt {\frac {a x + b}{x}} \sqrt {\frac {c x + d}{x}} + 8 \, {\left (b^{2} c d + a b d^{2}\right )} x}{x^{2}}\right ), \sqrt {-\frac {d}{b}} \arctan \left (\frac {{\left (2 \, b d x + {\left (b c + a d\right )} x^{2}\right )} \sqrt {-\frac {d}{b}} \sqrt {\frac {a x + b}{x}} \sqrt {\frac {c x + d}{x}}}{2 \, {\left (a c d x^{2} + b d^{2} + {\left (b c d + a d^{2}\right )} x\right )}}\right ) + \frac {1}{2} \, \sqrt {\frac {c}{a}} \log \left (-8 \, a^{2} c^{2} x^{2} - b^{2} c^{2} - 6 \, a b c d - a^{2} d^{2} - 4 \, {\left (2 \, a^{2} c x^{2} + {\left (a b c + a^{2} d\right )} x\right )} \sqrt {\frac {c}{a}} \sqrt {\frac {a x + b}{x}} \sqrt {\frac {c x + d}{x}} - 8 \, {\left (a b c^{2} + a^{2} c d\right )} x\right ), -\sqrt {-\frac {c}{a}} \arctan \left (\frac {2 \, a x \sqrt {-\frac {c}{a}} \sqrt {\frac {a x + b}{x}} \sqrt {\frac {c x + d}{x}}}{2 \, a c x + b c + a d}\right ) + \sqrt {-\frac {d}{b}} \arctan \left (\frac {{\left (2 \, b d x + {\left (b c + a d\right )} x^{2}\right )} \sqrt {-\frac {d}{b}} \sqrt {\frac {a x + b}{x}} \sqrt {\frac {c x + d}{x}}}{2 \, {\left (a c d x^{2} + b d^{2} + {\left (b c d + a d^{2}\right )} x\right )}}\right )\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d/x)^(1/2)/x/(a+b/x)^(1/2),x, algorithm="fricas")

[Out]

[1/2*sqrt(c/a)*log(-8*a^2*c^2*x^2 - b^2*c^2 - 6*a*b*c*d - a^2*d^2 - 4*(2*a^2*c*x^2 + (a*b*c + a^2*d)*x)*sqrt(c
/a)*sqrt((a*x + b)/x)*sqrt((c*x + d)/x) - 8*(a*b*c^2 + a^2*c*d)*x) + 1/2*sqrt(d/b)*log(-(8*b^2*d^2 + (b^2*c^2
+ 6*a*b*c*d + a^2*d^2)*x^2 - 4*(2*b^2*d*x + (b^2*c + a*b*d)*x^2)*sqrt(d/b)*sqrt((a*x + b)/x)*sqrt((c*x + d)/x)
 + 8*(b^2*c*d + a*b*d^2)*x)/x^2), -sqrt(-c/a)*arctan(2*a*x*sqrt(-c/a)*sqrt((a*x + b)/x)*sqrt((c*x + d)/x)/(2*a
*c*x + b*c + a*d)) + 1/2*sqrt(d/b)*log(-(8*b^2*d^2 + (b^2*c^2 + 6*a*b*c*d + a^2*d^2)*x^2 - 4*(2*b^2*d*x + (b^2
*c + a*b*d)*x^2)*sqrt(d/b)*sqrt((a*x + b)/x)*sqrt((c*x + d)/x) + 8*(b^2*c*d + a*b*d^2)*x)/x^2), sqrt(-d/b)*arc
tan(1/2*(2*b*d*x + (b*c + a*d)*x^2)*sqrt(-d/b)*sqrt((a*x + b)/x)*sqrt((c*x + d)/x)/(a*c*d*x^2 + b*d^2 + (b*c*d
 + a*d^2)*x)) + 1/2*sqrt(c/a)*log(-8*a^2*c^2*x^2 - b^2*c^2 - 6*a*b*c*d - a^2*d^2 - 4*(2*a^2*c*x^2 + (a*b*c + a
^2*d)*x)*sqrt(c/a)*sqrt((a*x + b)/x)*sqrt((c*x + d)/x) - 8*(a*b*c^2 + a^2*c*d)*x), -sqrt(-c/a)*arctan(2*a*x*sq
rt(-c/a)*sqrt((a*x + b)/x)*sqrt((c*x + d)/x)/(2*a*c*x + b*c + a*d)) + sqrt(-d/b)*arctan(1/2*(2*b*d*x + (b*c +
a*d)*x^2)*sqrt(-d/b)*sqrt((a*x + b)/x)*sqrt((c*x + d)/x)/(a*c*d*x^2 + b*d^2 + (b*c*d + a*d^2)*x))]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {c + \frac {d}{x}}}{x \sqrt {a + \frac {b}{x}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d/x)**(1/2)/x/(a+b/x)**(1/2),x)

[Out]

Integral(sqrt(c + d/x)/(x*sqrt(a + b/x)), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d/x)^(1/2)/x/(a+b/x)^(1/2),x, algorithm="giac")

[Out]

integrate(sqrt(c + d/x)/(sqrt(a + b/x)*x), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sqrt {c+\frac {d}{x}}}{x\,\sqrt {a+\frac {b}{x}}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d/x)^(1/2)/(x*(a + b/x)^(1/2)),x)

[Out]

int((c + d/x)^(1/2)/(x*(a + b/x)^(1/2)), x)

________________________________________________________________________________________